package com.hjm.project.ActPaymentType.ActPaymentType.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hjm.project.ActPaymentType.ActPaymentType.mapper.ActPaymentTypeMapper;
import com.hjm.project.ActPaymentType.ActPaymentType.domain.ActPaymentType;
import com.hjm.project.ActPaymentType.ActPaymentType.service.IActPaymentTypeService;
import com.hjm.common.utils.text.Convert;

/**
 * 支付类型Service业务层处理
 * 
 * @author ActPaymentType
 * @date 2020-11-29
 */
@Service
public class ActPaymentTypeServiceImpl implements IActPaymentTypeService 
{
    @Autowired
    private ActPaymentTypeMapper actPaymentTypeMapper;

    /**
     * 查询支付类型
     * 
     * @param id 支付类型ID
     * @return 支付类型
     */
    @Override
    public ActPaymentType selectActPaymentTypeById(Long id)
    {
        return actPaymentTypeMapper.selectActPaymentTypeById(id);
    }

    @Override
    public List<Map<String, Object>> getActPaymentType(Map<String, Object> map) throws Exception {
        return actPaymentTypeMapper.getActPaymentType(map);
    }



    /**
     * 查询支付类型列表
     * 
     * @param actPaymentType 支付类型
     * @return 支付类型
     */
    @Override
    public List<ActPaymentType> selectActPaymentTypeList(ActPaymentType actPaymentType)
    {
        return actPaymentTypeMapper.selectActPaymentTypeList(actPaymentType);
    }

    /**
     * 新增支付类型
     * 
     * @param actPaymentType 支付类型
     * @return 结果
     */
    @Override
    public int insertActPaymentType(ActPaymentType actPaymentType)
    {
        return actPaymentTypeMapper.insertActPaymentType(actPaymentType);
    }

    /**
     * 修改支付类型
     * 
     * @param actPaymentType 支付类型
     * @return 结果
     */
    @Override
    public int updateActPaymentType(ActPaymentType actPaymentType)
    {
        return actPaymentTypeMapper.updateActPaymentType(actPaymentType);
    }

    /**
     * 删除支付类型对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteActPaymentTypeByIds(String ids)
    {
        return actPaymentTypeMapper.deleteActPaymentTypeByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除支付类型信息
     * 
     * @param id 支付类型ID
     * @return 结果
     */
    @Override
    public int deleteActPaymentTypeById(Long id)
    {
        return actPaymentTypeMapper.deleteActPaymentTypeById(id);
    }
    @Override
    public boolean addActPaymentType(Map<String, Object> map) throws Exception {
        return actPaymentTypeMapper.addActPaymentType(map) > 0;
    }

    @Override
    public boolean deleteActPaymentType(Map<String, Object> map) throws Exception {
        return actPaymentTypeMapper.deleteActPaymentType(map) > 0;
    }
}
